---
layout: m1x_soap
title: Product Link List
---

<h2><a name="catalog_product_link.list-Module%3AMageCatalog"></a>Module: Mage_Catalog</h2>


<h4><a name="catalog_product_link.list-Resource%3Acatalogproductlink"></a>Resource: catalog_product_link</h4>

<p><b>Aliases:</b></p>
<ul>
	<li>product_link</li>
</ul>


<h5><a name="catalog_product_link.list-Method%3A"></a>Method:</h5>

<ul>
	<li>catalog_product_link.list (SOAP V1)</li>
	<li>catalogProductLinkList (SOAP V2)</li>
</ul>


<p>Allows you to retrieve the list of linked products for a specific product.</p>

<p><b>Aliases:</b></p>
<ul>
	<li>product_link.list</li>
</ul>



<p><b>Arguments:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> sessionId <br class="atl-forced-newline" /> </td>
<td> Session ID </td>
</tr>
<tr>
<td> string </td>
<td> type <br class="atl-forced-newline" /> </td>
<td> Type of the link (cross_sell, up_sell, related, or grouped) </td>
</tr>
<tr>
<td> string </td>
<td> product\productId <br class="atl-forced-newline" /> </td>
<td> Product ID or SKU </td>
</tr>
<tr>
<td> string </td>
<td> identifierType </td>
<td> Defines whether the product ID or SKU is passed in the 'product' parameter </td>
</tr>
</tbody></table>



<p><b>Returns</b>:</p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> array </td>
<td> result </td>
<td> Array of catalogProductLinkEntity </td>
</tr>
</tbody></table>


<p>The <b>catalogProductLinkEntity</b> content is as follows:</p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> product_id <br class="atl-forced-newline" /> </td>
<td> Product ID </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> type <br class="atl-forced-newline" /> </td>
<td> Type of the link </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> set <br class="atl-forced-newline" /> </td>
<td> Product attribute set </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> sku <br class="atl-forced-newline" /> </td>
<td> Product SKU </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> position <br class="atl-forced-newline" /> </td>
<td> Position </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> qty <br class="atl-forced-newline" /> </td>
<td> Quantity </td>
</tr>
</tbody></table>


<h4><a name="catalog_product_link.list-Examples"></a>Examples</h4>

<h5><a name="catalog_product_link.list-RequestExampleSOAPV1"></a>Request Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$client = new SoapClient('http://magentohost/api/soap/?wsdl');

// If somestuff requires API authentication,
// then get a session token
$session = $client-&gt;login('apiUser', 'apiKey');

$result = $client-&gt;call($session, 'catalog_product_link.list', array('type' =&gt; 'related', 'product' =&gt; '1'));
var_dump ($result);

// If you don't need the session anymore
//$client-&gt;endSession($session);</pre>
		</div>
</div></div>

<h5><a name="catalog_product_link.list-RequestExampleSOAPV2"></a>Request Example SOAP V2</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy-&gt;login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary

$result = $proxy-&gt;catalogProductLinkList($sessionId, 'related', '1');
var_dump($result);</pre>
		</div>
</div></div>



<h5><a name="catalog_product_link.list-RequestExampleSOAPV2%28WSIComplianceMode%29"></a>Request Example SOAP V2 (WS-I Compliance Mode)</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl');
$sessionId = $proxy-&gt;login((object)array('username' =&gt; 'apiUser', 'apiKey' =&gt; 'apiKey'));

$result = $proxy-&gt;catalogProductLinkList((object)array('sessionId' =&gt; $sessionId-&gt;result, 'type' =&gt; 'related', 'productId' =&gt; '1'));

var_dump($result-&gt;result);</pre>
		</div>
</div></div>

<h5><a name="catalog_product_link.list-ResponseExampleSOAPV1"></a>Response Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: java; gutter: false">array
  0 =&gt;
    array
      'product_id' =&gt; string '3' (length=1)
      'type' =&gt; string 'simple' (length=6)
      'set' =&gt; string '4' (length=1)
      'sku' =&gt; string 'canonxt' (length=7)
      'position' =&gt; string '1' (length=1)
  1 =&gt;
    array
      'product_id' =&gt; string '4' (length=1)
      'type' =&gt; string 'simple' (length=6)
      'set' =&gt; string '4' (length=1)
      'sku' =&gt; string 'canon_powershot' (length=15)
      'position' =&gt; string '0' (length=1)</pre>
		</div>
</div></div>


